Skip to content

ci: enforce test-plan task-list completion on PRs#29

Merged
rocketman-code merged 1 commit intomainfrom
chore/pr-task-list-enforcement
Apr 14, 2026
Merged

ci: enforce test-plan task-list completion on PRs#29
rocketman-code merged 1 commit intomainfrom
chore/pr-task-list-enforcement

Conversation

@rocketman-code
Copy link
Copy Markdown
Owner

@rocketman-code rocketman-code commented Apr 14, 2026

Summary

  • Adds .github/workflows/pr-task-list.yml. Fails on any unchecked task-list item (- [ ]) in a PR body. Skips drafts.
  • Error message says "complete," not "complete or remove," because removing the checklist defeats the purpose. The obligation is doing the test, not editing the PR body.

Why

PR test plans exist to enforce verification discipline. Without mechanical enforcement, "complete the box" silently degrades into "merge anyway." Under atomic-rollback's trust contract, code touching the boot chain cannot ship through unverified review checkpoints.

What "delivered" means here

A workflow that exists but isn't in required checks is advisory, not enforcing. This PR's deliverable is the enforcement, not the YAML alone. Three required-check additions are part of this PR's completion contract:

  1. task-list-completed (the workflow this PR adds)
  2. tests (ubuntu-latest) (added by PR ci: add cargo test job on ubuntu + macos matrix #30, never made required — backlog cleanup)
  3. tests (macos-latest) (same)

These get added immediately after merge via:

gh api -X POST repos/rocketman-code/atomic-rollback/branches/main/protection/required_status_checks/contexts \
  --input - <<'IN'
{
  "contexts": [
    "task-list-completed",
    "tests (ubuntu-latest)",
    "tests (macos-latest)"
  ]
}
IN

Sequencing rule: task-list-completed MUST be added AFTER this PR merges. Adding it before merge would block all PRs (the workflow doesn't exist on main yet, no check reports with that name).

Test plan

  • Tested locally against six PR-body scenarios: unchecked present (FAIL), all-checked (PASS), no task list (PASS), empty body (PASS), indented unchecked (FAIL), similar-looking non-task text (PASS)
  • Workflow YAML syntax valid (parsed by GitHub Actions on PR open)
  • All five CI checks pass on this PR: task-list-completed, tests (ubuntu-latest), tests (macos-latest), x86_64, aarch64-cross
  • Workflow correctly caught its own dogfood violation: initial PR body included an unchecked post-merge follow-up item, workflow failed the check, body restructured

Post-merge motion (single committed sequence, executed atomically with merge)

Not a checkbox because it can only be verified after merge — but binding as the maintainer's commitment to complete the deliverable. The merge is incomplete until the API call runs and is verified.

  1. gh pr merge 29 --rebase --delete-branch
  2. Run the gh api command above
  3. Verify with gh api repos/rocketman-code/atomic-rollback/branches/main/protection --jq '.required_status_checks.contexts' — expect five contexts: x86_64, aarch64-cross, task-list-completed, tests (ubuntu-latest), tests (macos-latest)

If verification fails, the PR is unfinished.

PR task lists exist to enforce verification discipline (every test
run, every box checked before merge). Without enforcement, "complete
the box" silently degrades into "merge anyway." This workflow fails
on any unchecked task-list item in a PR body, blocking merge via
required status check.

Skip conditions:
- Drafts (intentional WIP, not ready for review)

The error message says "complete," not "complete or remove," because
removing the checklist defeats the purpose. The obligation is doing
the test, not editing the PR body.

Tested locally against six representative PR body shapes (unchecked,
all-checked, no list, empty body, indented unchecked, similar-looking
non-task text). All behaved correctly.

After merge, branch protection on main needs to be updated in repo
settings to require the new task-list-completed check.
@rocketman-code rocketman-code force-pushed the chore/pr-task-list-enforcement branch from 4556e16 to f630d35 Compare April 14, 2026 08:03
@rocketman-code rocketman-code merged commit 170142d into main Apr 14, 2026
6 of 7 checks passed
@rocketman-code rocketman-code deleted the chore/pr-task-list-enforcement branch April 14, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant